from django.http import JsonResponse
from django.shortcuts import render, HttpResponse, redirect
from appForTest.utils import DB

def get_list01(request):
    result = 'get无参接口'
    return HttpResponse(result)


def get_list02(request):
    id = request.GET.get('id')
    user = request.GET.get('user')
    sex = request.GET.get('sex')
    dt = {
        'id': id,
        'user': user,
        'sex': sex
    }
    return JsonResponse(dt)


def post_obj01(request):
    result = 'post无参接口'
    return HttpResponse(result)


def post_obj02(request):
    id = request.POST.get('id')
    user = request.POST.get('user')
    sex = request.POST.get('sex')
    dt = {
        'id': id,
        'user': user,
        'sex': sex
    }
    return JsonResponse(dt)
